package com.itheima.jingjie.TreeSet集合;

import java.util.Comparator;
import java.util.TreeSet;

public class MyTreeSet {
    public static void main(String[] args) {
        TreeSet<Student> set=new TreeSet<>();
        set.add(new Student("zhangsan",24));
        set.add(new Student("lisi",22));
        set.add(new Student("wangwu",22));
        for (Student student : set) {
            System.out.println(student);
        }
    }
}
